.class public Lorg/acra/ErrorReporter;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Ljava/lang/Thread$UncaughtExceptionHandler;


# static fields
.field private static j:Z


# instance fields
.field private a:Z

.field private final b:Landroid/content/Context;

.field private final c:Landroid/content/SharedPreferences;

.field private final d:Ljava/util/List;

.field private final e:Lorg/acra/b/d;

.field private final f:Lorg/acra/i;

.field private final g:Ljava/lang/Thread$UncaughtExceptionHandler;

.field private h:Ljava/lang/Thread;

.field private i:Ljava/lang/Throwable;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 103
    const/4 v0, 0x1

    sput-boolean v0, Lorg/acra/ErrorReporter;->j:Z

    return-void
.end method

.method constructor <init>(Landroid/content/Context;Landroid/content/SharedPreferences;Z)V
    .locals 4
    .parameter
    .parameter
    .parameter

    .prologue
    .line 116
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 77
    const/4 v0, 0x0

    iput-boolean v0, p0, Lorg/acra/ErrorReporter;->a:Z

    .line 85
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lorg/acra/ErrorReporter;->d:Ljava/util/List;

    .line 89
    new-instance v0, Lorg/acra/i;

    invoke-direct {v0}, Lorg/acra/i;-><init>()V

    iput-object v0, p0, Lorg/acra/ErrorReporter;->f:Lorg/acra/i;

    .line 118
    iput-object p1, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    .line 119
    iput-object p2, p0, Lorg/acra/ErrorReporter;->c:Landroid/content/SharedPreferences;

    .line 120
    iput-boolean p3, p0, Lorg/acra/ErrorReporter;->a:Z

    .line 123
    iget-object v0, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-static {v0}, Lorg/acra/b/b;->a(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    .line 128
    new-instance v1, Landroid/text/format/Time;

    invoke-direct {v1}, Landroid/text/format/Time;-><init>()V

    .line 129
    invoke-virtual {v1}, Landroid/text/format/Time;->setToNow()V

    .line 131
    new-instance v2, Lorg/acra/b/d;

    iget-object v3, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-direct {v2, v3, p2, v1, v0}, Lorg/acra/b/d;-><init>(Landroid/content/Context;Landroid/content/SharedPreferences;Landroid/text/format/Time;Ljava/lang/String;)V

    iput-object v2, p0, Lorg/acra/ErrorReporter;->e:Lorg/acra/b/d;

    .line 135
    invoke-static {}, Ljava/lang/Thread;->getDefaultUncaughtExceptionHandler()Ljava/lang/Thread$UncaughtExceptionHandler;

    move-result-object v0

    iput-object v0, p0, Lorg/acra/ErrorReporter;->g:Ljava/lang/Thread$UncaughtExceptionHandler;

    .line 136
    invoke-static {p0}, Ljava/lang/Thread;->setDefaultUncaughtExceptionHandler(Ljava/lang/Thread$UncaughtExceptionHandler;)V

    .line 139
    invoke-virtual {p0}, Lorg/acra/ErrorReporter;->c()V

    .line 140
    return-void
.end method

.method static synthetic a(Lorg/acra/ErrorReporter;)Landroid/content/Context;
    .locals 1
    .parameter

    .prologue
    .line 75
    iget-object v0, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    return-object v0
.end method

.method private a(Lorg/acra/b/c;)Ljava/lang/String;
    .locals 5
    .parameter

    .prologue
    .line 732
    new-instance v0, Landroid/text/format/Time;

    invoke-direct {v0}, Landroid/text/format/Time;-><init>()V

    .line 733
    invoke-virtual {v0}, Landroid/text/format/Time;->setToNow()V

    .line 734
    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/text/format/Time;->toMillis(Z)J

    move-result-wide v0

    .line 735
    sget-object v2, Lorg/acra/ReportField;->IS_SILENT:Lorg/acra/ReportField;

    invoke-virtual {p1, v2}, Lorg/acra/b/c;->a(Lorg/acra/ReportField;)Ljava/lang/String;

    move-result-object v2

    .line 736
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, ""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v1

    if-eqz v2, :cond_0

    sget-object v0, Lorg/acra/e;->a:Ljava/lang/String;

    :goto_0
    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ".stacktrace"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0

    :cond_0
    const-string v0, ""

    goto :goto_0
.end method

.method private a([Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .parameter

    .prologue
    .line 775
    if-eqz p1, :cond_2

    array-length v0, p1

    if-lez v0, :cond_2

    .line 776
    array-length v0, p1

    add-int/lit8 v0, v0, -0x1

    :goto_0
    if-ltz v0, :cond_1

    .line 777
    iget-object v1, p0, Lorg/acra/ErrorReporter;->f:Lorg/acra/i;

    aget-object v2, p1, v0

    invoke-virtual {v1, v2}, Lorg/acra/i;->a(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 778
    aget-object v0, p1, v0

    .line 784
    :goto_1
    return-object v0

    .line 776
    :cond_0
    add-int/lit8 v0, v0, -0x1

    goto :goto_0

    .line 782
    :cond_1
    array-length v0, p1

    add-int/lit8 v0, v0, -0x1

    aget-object v0, p1, v0

    goto :goto_1

    .line 784
    :cond_2
    const/4 v0, 0x0

    goto :goto_1
.end method

.method private a(Ljava/lang/String;Lorg/acra/b/c;)V
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 757
    :try_start_0
    sget-object v0, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Writing crash report file "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "."

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 758
    new-instance v0, Lorg/acra/l;

    iget-object v1, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-direct {v0, v1}, Lorg/acra/l;-><init>(Landroid/content/Context;)V

    .line 759
    invoke-virtual {v0, p2, p1}, Lorg/acra/l;->a(Lorg/acra/b/c;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 763
    :goto_0
    return-void

    .line 760
    :catch_0
    move-exception v0

    .line 761
    sget-object v1, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    const-string v2, "An error occurred while writing the report file..."

    invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_0
.end method

.method private a(Ljava/lang/Throwable;Lorg/acra/ReportingInteractionMode;ZZ)V
    .locals 8
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    const/4 v3, 0x1

    const/4 v0, 0x0

    .line 531
    iget-boolean v1, p0, Lorg/acra/ErrorReporter;->a:Z

    if-nez v1, :cond_0

    .line 670
    :goto_0
    return-void

    .line 536
    :cond_0
    if-nez p2, :cond_7

    .line 539
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v1

    invoke-virtual {v1}, Lorg/acra/c;->q()Lorg/acra/ReportingInteractionMode;

    move-result-object p2

    move v5, v0

    .line 551
    :goto_1
    if-nez p1, :cond_1

    .line 552
    new-instance p1, Ljava/lang/Exception;

    const-string v1, "Report requested by developer"

    invoke-direct {p1, v1}, Ljava/lang/Exception;-><init>(Ljava/lang/String;)V

    .line 555
    :cond_1
    sget-object v1, Lorg/acra/ReportingInteractionMode;->TOAST:Lorg/acra/ReportingInteractionMode;

    if-eq p2, v1, :cond_2

    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v1

    invoke-virtual {v1}, Lorg/acra/c;->B()I

    move-result v1

    if-eqz v1, :cond_8

    sget-object v1, Lorg/acra/ReportingInteractionMode;->NOTIFICATION:Lorg/acra/ReportingInteractionMode;

    if-eq p2, v1, :cond_2

    sget-object v1, Lorg/acra/ReportingInteractionMode;->DIALOG:Lorg/acra/ReportingInteractionMode;

    if-ne p2, v1, :cond_8

    :cond_2
    move v1, v3

    .line 558
    :goto_2
    if-eqz v1, :cond_3

    .line 559
    new-instance v2, Lorg/acra/m;

    invoke-direct {v2, p0}, Lorg/acra/m;-><init>(Lorg/acra/ErrorReporter;)V

    invoke-virtual {v2}, Lorg/acra/m;->start()V

    .line 579
    :cond_3
    iget-object v2, p0, Lorg/acra/ErrorReporter;->e:Lorg/acra/b/d;

    iget-object v4, p0, Lorg/acra/ErrorReporter;->h:Ljava/lang/Thread;

    invoke-virtual {v2, p1, p3, v4}, Lorg/acra/b/d;->a(Ljava/lang/Throwable;ZLjava/lang/Thread;)Lorg/acra/b/c;

    move-result-object v2

    .line 584
    invoke-direct {p0, v2}, Lorg/acra/ErrorReporter;->a(Lorg/acra/b/c;)Ljava/lang/String;

    move-result-object v4

    .line 585
    invoke-direct {p0, v4, v2}, Lorg/acra/ErrorReporter;->a(Ljava/lang/String;Lorg/acra/b/c;)V

    .line 587
    const/4 v2, 0x0

    .line 589
    sget-object v6, Lorg/acra/ReportingInteractionMode;->SILENT:Lorg/acra/ReportingInteractionMode;

    if-eq p2, v6, :cond_4

    sget-object v6, Lorg/acra/ReportingInteractionMode;->TOAST:Lorg/acra/ReportingInteractionMode;

    if-eq p2, v6, :cond_4

    iget-object v6, p0, Lorg/acra/ErrorReporter;->c:Landroid/content/SharedPreferences;

    const-string v7, "acra.alwaysaccept"

    invoke-interface {v6, v7, v0}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v6

    if-eqz v6, :cond_9

    .line 594
    :cond_4
    sget-object v2, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    const-string v6, "About to start ReportSenderWorker from #handleException"

    invoke-static {v2, v6}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 595
    invoke-virtual {p0, v5, v3}, Lorg/acra/ErrorReporter;->a(ZZ)Lorg/acra/aa;

    move-result-object v2

    .line 602
    :cond_5
    :goto_3
    if-eqz v1, :cond_6

    .line 607
    sput-boolean v0, Lorg/acra/ErrorReporter;->j:Z

    .line 608
    new-instance v1, Lorg/acra/n;

    invoke-direct {v1, p0}, Lorg/acra/n;-><init>(Lorg/acra/ErrorReporter;)V

    invoke-virtual {v1}, Lorg/acra/n;->start()V

    .line 636
    :cond_6
    sget-object v1, Lorg/acra/ReportingInteractionMode;->DIALOG:Lorg/acra/ReportingInteractionMode;

    if-ne p2, v1, :cond_a

    iget-object v1, p0, Lorg/acra/ErrorReporter;->c:Landroid/content/SharedPreferences;

    const-string v5, "acra.alwaysaccept"

    invoke-interface {v1, v5, v0}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    if-nez v1, :cond_a

    .line 639
    :goto_4
    new-instance v0, Lorg/acra/o;

    move-object v1, p0

    move v5, p4

    invoke-direct/range {v0 .. v5}, Lorg/acra/o;-><init>(Lorg/acra/ErrorReporter;Lorg/acra/aa;ZLjava/lang/String;Z)V

    invoke-virtual {v0}, Lorg/acra/o;->start()V

    goto/16 :goto_0

    .line 545
    :cond_7
    sget-object v1, Lorg/acra/ReportingInteractionMode;->SILENT:Lorg/acra/ReportingInteractionMode;

    if-ne p2, v1, :cond_b

    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v1

    invoke-virtual {v1}, Lorg/acra/c;->q()Lorg/acra/ReportingInteractionMode;

    move-result-object v1

    sget-object v2, Lorg/acra/ReportingInteractionMode;->SILENT:Lorg/acra/ReportingInteractionMode;

    if-eq v1, v2, :cond_b

    move v5, v3

    .line 547
    goto/16 :goto_1

    :cond_8
    move v1, v0

    .line 555
    goto :goto_2

    .line 596
    :cond_9
    sget-object v5, Lorg/acra/ReportingInteractionMode;->NOTIFICATION:Lorg/acra/ReportingInteractionMode;

    if-ne p2, v5, :cond_5

    .line 598
    sget-object v5, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    const-string v6, "About to send status bar notification from #handleException"

    invoke-static {v5, v6}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 599
    invoke-direct {p0, v4}, Lorg/acra/ErrorReporter;->b(Ljava/lang/String;)V

    goto :goto_3

    :cond_a
    move v3, v0

    .line 636
    goto :goto_4

    :cond_b
    move v5, v0

    goto/16 :goto_1
.end method

.method private a(ZZI)V
    .locals 6
    .parameter
    .parameter
    .parameter

    .prologue
    .line 802
    new-instance v0, Lorg/acra/j;

    iget-object v1, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-direct {v0, v1}, Lorg/acra/j;-><init>(Landroid/content/Context;)V

    .line 803
    invoke-virtual {v0}, Lorg/acra/j;->a()[Ljava/lang/String;

    move-result-object v1

    .line 804
    invoke-static {v1}, Ljava/util/Arrays;->sort([Ljava/lang/Object;)V

    .line 805
    if-eqz v1, :cond_3

    .line 806
    const/4 v0, 0x0

    :goto_0
    array-length v2, v1

    sub-int/2addr v2, p3

    if-ge v0, v2, :cond_3

    .line 807
    aget-object v2, v1, v0

    .line 808
    iget-object v3, p0, Lorg/acra/ErrorReporter;->f:Lorg/acra/i;

    invoke-virtual {v3, v2}, Lorg/acra/i;->b(Ljava/lang/String;)Z

    move-result v3

    .line 809
    if-eqz v3, :cond_0

    if-nez p1, :cond_1

    :cond_0
    if-nez v3, :cond_2

    if-eqz p2, :cond_2

    .line 810
    :cond_1
    new-instance v3, Ljava/io/File;

    iget-object v4, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object v4

    invoke-direct {v3, v4, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 811
    invoke-virtual {v3}, Ljava/io/File;->delete()Z

    move-result v2

    if-nez v2, :cond_2

    .line 812
    sget-object v2, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "Could not delete report : "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 806
    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 817
    :cond_3
    return-void
.end method

.method private b(Ljava/lang/String;)V
    .locals 8
    .parameter

    .prologue
    .line 703
    iget-object v0, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    const-string v1, "notification"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManager;

    .line 706
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v1

    .line 709
    invoke-interface {v1}, Lorg/acra/a/a;->x()I

    move-result v2

    .line 711
    iget-object v3, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-interface {v1}, Lorg/acra/a/a;->z()I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;

    move-result-object v3

    .line 712
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    .line 713
    new-instance v6, Landroid/app/Notification;

    invoke-direct {v6, v2, v3, v4, v5}, Landroid/app/Notification;-><init>(ILjava/lang/CharSequence;J)V

    .line 715
    iget-object v2, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-interface {v1}, Lorg/acra/a/a;->A()I

    move-result v3

    invoke-virtual {v2, v3}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;

    move-result-object v2

    .line 716
    iget-object v3, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-interface {v1}, Lorg/acra/a/a;->y()I

    move-result v1

    invoke-virtual {v3, v1}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    .line 718
    new-instance v3, Landroid/content/Intent;

    iget-object v4, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    const-class v5, Lorg/acra/CrashReportDialog;

    invoke-direct {v3, v4, v5}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 719
    sget-object v4, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v7, "Creating Notification for "

    invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 720
    const-string v4, "REPORT_FILE_NAME"

    invoke-virtual {v3, v4, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 721
    iget-object v4, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    const/4 v5, 0x0

    const/high16 v7, 0x800

    invoke-static {v4, v5, v3, v7}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v3

    .line 724
    iget-object v4, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-virtual {v6, v4, v2, v1, v3}, Landroid/app/Notification;->setLatestEventInfo(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V

    .line 727
    invoke-virtual {v0}, Landroid/app/NotificationManager;->cancelAll()V

    .line 728
    const/16 v1, 0x29a

    invoke-virtual {v0, v1, v6}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V

    .line 729
    return-void
.end method

.method static synthetic b(Lorg/acra/ErrorReporter;)V
    .locals 0
    .parameter

    .prologue
    .line 75
    invoke-direct {p0}, Lorg/acra/ErrorReporter;->f()V

    return-void
.end method

.method private b([Ljava/lang/String;)Z
    .locals 5
    .parameter

    .prologue
    const/4 v0, 0x0

    .line 829
    array-length v2, p1

    move v1, v0

    :goto_0
    if-ge v1, v2, :cond_1

    aget-object v3, p1, v1

    .line 830
    iget-object v4, p0, Lorg/acra/ErrorReporter;->f:Lorg/acra/i;

    invoke-virtual {v4, v3}, Lorg/acra/i;->b(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_0

    .line 834
    :goto_1
    return v0

    .line 829
    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 834
    :cond_1
    const/4 v0, 0x1

    goto :goto_1
.end method

.method static synthetic c(Z)Z
    .locals 0
    .parameter

    .prologue
    .line 75
    sput-boolean p0, Lorg/acra/ErrorReporter;->j:Z

    return p0
.end method

.method static synthetic e()Z
    .locals 1

    .prologue
    .line 75
    sget-boolean v0, Lorg/acra/ErrorReporter;->j:Z

    return v0
.end method

.method private f()V
    .locals 3

    .prologue
    .line 321
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v0

    invoke-virtual {v0}, Lorg/acra/c;->q()Lorg/acra/ReportingInteractionMode;

    move-result-object v0

    sget-object v1, Lorg/acra/ReportingInteractionMode;->SILENT:Lorg/acra/ReportingInteractionMode;

    if-eq v0, v1, :cond_0

    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v0

    invoke-virtual {v0}, Lorg/acra/c;->q()Lorg/acra/ReportingInteractionMode;

    move-result-object v0

    sget-object v1, Lorg/acra/ReportingInteractionMode;->TOAST:Lorg/acra/ReportingInteractionMode;

    if-ne v0, v1, :cond_1

    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v0

    invoke-virtual {v0}, Lorg/acra/c;->h()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 326
    :cond_0
    iget-object v0, p0, Lorg/acra/ErrorReporter;->g:Ljava/lang/Thread$UncaughtExceptionHandler;

    iget-object v1, p0, Lorg/acra/ErrorReporter;->h:Ljava/lang/Thread;

    iget-object v2, p0, Lorg/acra/ErrorReporter;->i:Ljava/lang/Throwable;

    invoke-interface {v0, v1, v2}, Ljava/lang/Thread$UncaughtExceptionHandler;->uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V

    .line 336
    :goto_0
    return-void

    .line 331
    :cond_1
    sget-object v0, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v2, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " fatal error : "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lorg/acra/ErrorReporter;->i:Ljava/lang/Throwable;

    invoke-virtual {v2}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p0, Lorg/acra/ErrorReporter;->i:Ljava/lang/Throwable;

    invoke-static {v0, v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 333
    invoke-static {}, Landroid/os/Process;->myPid()I

    move-result v0

    invoke-static {v0}, Landroid/os/Process;->killProcess(I)V

    .line 334
    const/16 v0, 0xa

    invoke-static {v0}, Ljava/lang/System;->exit(I)V

    goto :goto_0
.end method


# virtual methods
.method a(ZZ)Lorg/acra/aa;
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 380
    new-instance v0, Lorg/acra/aa;

    iget-object v1, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    iget-object v2, p0, Lorg/acra/ErrorReporter;->d:Ljava/util/List;

    invoke-direct {v0, v1, v2, p1, p2}, Lorg/acra/aa;-><init>(Landroid/content/Context;Ljava/util/List;ZZ)V

    .line 381
    invoke-virtual {v0}, Lorg/acra/aa;->start()V

    .line 382
    return-object v0
.end method

.method public a()V
    .locals 1

    .prologue
    .line 261
    iget-object v0, p0, Lorg/acra/ErrorReporter;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 262
    return-void
.end method

.method a(Ljava/lang/String;)V
    .locals 3
    .parameter

    .prologue
    .line 681
    sget-object v0, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Creating Dialog for "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 682
    new-instance v0, Landroid/content/Intent;

    iget-object v1, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    const-class v2, Lorg/acra/CrashReportDialog;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 683
    const-string v1, "REPORT_FILE_NAME"

    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 684
    const/high16 v1, 0x1000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 685
    iget-object v1, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 686
    return-void
.end method

.method public a(Ljava/lang/Throwable;)V
    .locals 2
    .parameter

    .prologue
    const/4 v1, 0x0

    .line 509
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v0

    invoke-virtual {v0}, Lorg/acra/c;->q()Lorg/acra/ReportingInteractionMode;

    move-result-object v0

    invoke-direct {p0, p1, v0, v1, v1}, Lorg/acra/ErrorReporter;->a(Ljava/lang/Throwable;Lorg/acra/ReportingInteractionMode;ZZ)V

    .line 510
    return-void
.end method

.method public a(Lorg/acra/sender/d;)V
    .locals 1
    .parameter

    .prologue
    .line 225
    iget-object v0, p0, Lorg/acra/ErrorReporter;->d:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 226
    return-void
.end method

.method public a(Z)V
    .locals 3
    .parameter

    .prologue
    .line 366
    sget-object v1, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "ACRA is "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    if-eqz p1, :cond_0

    const-string v0, "enabled"

    :goto_0
    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, " for "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v2, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 367
    iput-boolean p1, p0, Lorg/acra/ErrorReporter;->a:Z

    .line 368
    return-void

    .line 366
    :cond_0
    const-string v0, "disabled"

    goto :goto_0
.end method

.method public addCustomData(Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .parameter
    .parameter
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 164
    iget-object v0, p0, Lorg/acra/ErrorReporter;->e:Lorg/acra/b/d;

    invoke-virtual {v0, p1, p2}, Lorg/acra/b/d;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    .line 165
    return-void
.end method

.method b()V
    .locals 2

    .prologue
    const/4 v1, 0x1

    .line 389
    const/4 v0, 0x0

    invoke-direct {p0, v1, v1, v0}, Lorg/acra/ErrorReporter;->a(ZZI)V

    .line 390
    return-void
.end method

.method public b(Lorg/acra/sender/d;)V
    .locals 0
    .parameter

    .prologue
    .line 272
    invoke-virtual {p0}, Lorg/acra/ErrorReporter;->a()V

    .line 273
    invoke-virtual {p0, p1}, Lorg/acra/ErrorReporter;->a(Lorg/acra/sender/d;)V

    .line 274
    return-void
.end method

.method b(Z)V
    .locals 3
    .parameter

    .prologue
    const/4 v1, 0x1

    const/4 v2, 0x0

    .line 480
    if-eqz p1, :cond_0

    move v0, v1

    .line 481
    :goto_0
    invoke-direct {p0, v2, v1, v0}, Lorg/acra/ErrorReporter;->a(ZZI)V

    .line 482
    return-void

    :cond_0
    move v0, v2

    .line 480
    goto :goto_0
.end method

.method public c()V
    .locals 8

    .prologue
    const/4 v1, 0x1

    const/4 v2, 0x0

    .line 400
    iget-object v0, p0, Lorg/acra/ErrorReporter;->c:Landroid/content/SharedPreferences;

    const-string v3, "acra.lastVersionNr"

    invoke-interface {v0, v3, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v0

    int-to-long v3, v0

    .line 401
    new-instance v0, Lorg/acra/d/j;

    iget-object v5, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-direct {v0, v5}, Lorg/acra/d/j;-><init>(Landroid/content/Context;)V

    .line 402
    invoke-virtual {v0}, Lorg/acra/d/j;->a()Landroid/content/pm/PackageInfo;

    move-result-object v5

    .line 403
    if-eqz v5, :cond_7

    iget v0, v5, Landroid/content/pm/PackageInfo;->versionCode:I

    int-to-long v6, v0

    cmp-long v0, v6, v3

    if-lez v0, :cond_7

    move v0, v1

    .line 404
    :goto_0
    if-eqz v0, :cond_1

    .line 405
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v0

    invoke-virtual {v0}, Lorg/acra/c;->f()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 406
    invoke-virtual {p0}, Lorg/acra/ErrorReporter;->b()V

    .line 408
    :cond_0
    iget-object v0, p0, Lorg/acra/ErrorReporter;->c:Landroid/content/SharedPreferences;

    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    .line 409
    const-string v3, "acra.lastVersionNr"

    iget v4, v5, Landroid/content/pm/PackageInfo;->versionCode:I

    invoke-interface {v0, v3, v4}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 410
    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 413
    :cond_1
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v0

    invoke-virtual {v0}, Lorg/acra/c;->q()Lorg/acra/ReportingInteractionMode;

    move-result-object v0

    sget-object v3, Lorg/acra/ReportingInteractionMode;->NOTIFICATION:Lorg/acra/ReportingInteractionMode;

    if-eq v0, v3, :cond_2

    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v0

    invoke-virtual {v0}, Lorg/acra/c;->q()Lorg/acra/ReportingInteractionMode;

    move-result-object v0

    sget-object v3, Lorg/acra/ReportingInteractionMode;->DIALOG:Lorg/acra/ReportingInteractionMode;

    if-ne v0, v3, :cond_3

    :cond_2
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v0

    invoke-virtual {v0}, Lorg/acra/c;->e()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 421
    invoke-virtual {p0, v1}, Lorg/acra/ErrorReporter;->b(Z)V

    .line 424
    :cond_3
    new-instance v0, Lorg/acra/j;

    iget-object v3, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-direct {v0, v3}, Lorg/acra/j;-><init>(Landroid/content/Context;)V

    .line 425
    invoke-virtual {v0}, Lorg/acra/j;->a()[Ljava/lang/String;

    move-result-object v3

    .line 427
    if-eqz v3, :cond_6

    array-length v3, v3

    if-lez v3, :cond_6

    .line 435
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v3

    invoke-virtual {v3}, Lorg/acra/c;->q()Lorg/acra/ReportingInteractionMode;

    move-result-object v3

    .line 437
    invoke-virtual {v0}, Lorg/acra/j;->a()[Ljava/lang/String;

    move-result-object v0

    .line 438
    invoke-direct {p0, v0}, Lorg/acra/ErrorReporter;->b([Ljava/lang/String;)Z

    move-result v4

    .line 440
    sget-object v5, Lorg/acra/ReportingInteractionMode;->SILENT:Lorg/acra/ReportingInteractionMode;

    if-eq v3, v5, :cond_4

    sget-object v5, Lorg/acra/ReportingInteractionMode;->TOAST:Lorg/acra/ReportingInteractionMode;

    if-eq v3, v5, :cond_4

    if-eqz v4, :cond_8

    sget-object v5, Lorg/acra/ReportingInteractionMode;->NOTIFICATION:Lorg/acra/ReportingInteractionMode;

    if-eq v3, v5, :cond_4

    sget-object v5, Lorg/acra/ReportingInteractionMode;->DIALOG:Lorg/acra/ReportingInteractionMode;

    if-ne v3, v5, :cond_8

    .line 444
    :cond_4
    sget-object v0, Lorg/acra/ReportingInteractionMode;->TOAST:Lorg/acra/ReportingInteractionMode;

    if-ne v3, v0, :cond_5

    if-nez v4, :cond_5

    .line 447
    iget-object v0, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v3

    invoke-virtual {v3}, Lorg/acra/c;->B()I

    move-result v3

    invoke-static {v0, v3, v1}, Lorg/acra/d/l;->a(Landroid/content/Context;II)V

    .line 450
    :cond_5
    sget-object v0, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    const-string v1, "About to start ReportSenderWorker from #checkReportOnApplicationStart"

    invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    .line 451
    invoke-virtual {p0, v2, v2}, Lorg/acra/ErrorReporter;->a(ZZ)Lorg/acra/aa;

    .line 468
    :cond_6
    :goto_1
    return-void

    :cond_7
    move v0, v2

    .line 403
    goto/16 :goto_0

    .line 452
    :cond_8
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v1

    invoke-virtual {v1}, Lorg/acra/c;->q()Lorg/acra/ReportingInteractionMode;

    move-result-object v1

    sget-object v2, Lorg/acra/ReportingInteractionMode;->NOTIFICATION:Lorg/acra/ReportingInteractionMode;

    if-ne v1, v2, :cond_9

    .line 456
    invoke-direct {p0, v0}, Lorg/acra/ErrorReporter;->a([Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Lorg/acra/ErrorReporter;->b(Ljava/lang/String;)V

    goto :goto_1

    .line 457
    :cond_9
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v1

    invoke-virtual {v1}, Lorg/acra/c;->q()Lorg/acra/ReportingInteractionMode;

    move-result-object v1

    sget-object v2, Lorg/acra/ReportingInteractionMode;->DIALOG:Lorg/acra/ReportingInteractionMode;

    if-ne v1, v2, :cond_6

    .line 464
    invoke-direct {p0, v0}, Lorg/acra/ErrorReporter;->a([Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lorg/acra/ErrorReporter;->a(Ljava/lang/String;)V

    goto :goto_1
.end method

.method public d()V
    .locals 4

    .prologue
    .line 842
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v0

    .line 843
    invoke-static {}, Lorg/acra/ACRA;->getApplication()Landroid/app/Application;

    move-result-object v1

    .line 844
    invoke-virtual {p0}, Lorg/acra/ErrorReporter;->a()V

    .line 848
    const-string v2, ""

    invoke-interface {v0}, Lorg/acra/a/a;->o()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_1

    .line 849
    sget-object v0, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1}, Landroid/app/Application;->getPackageName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " reports will be sent by email (if accepted by user)."

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v0, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 850
    new-instance v0, Lorg/acra/sender/a;

    invoke-direct {v0, v1}, Lorg/acra/sender/a;-><init>(Landroid/content/Context;)V

    invoke-virtual {p0, v0}, Lorg/acra/ErrorReporter;->b(Lorg/acra/sender/d;)V

    .line 881
    :cond_0
    :goto_0
    return-void

    .line 854
    :cond_1
    new-instance v2, Lorg/acra/d/j;

    invoke-direct {v2, v1}, Lorg/acra/d/j;-><init>(Landroid/content/Context;)V

    .line 855
    const-string v3, "android.permission.INTERNET"

    invoke-virtual {v2, v3}, Lorg/acra/d/j;->a(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_2

    .line 861
    sget-object v0, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1}, Landroid/app/Application;->getPackageName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " should be granted permission "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "android.permission.INTERNET"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " if you want your crash reports to be sent. If you don\'t want to add this permission to your application you can also enable sending reports by email. If this is your will then provide your email address in @ReportsCrashes(mailTo=\"your.account@domain.com\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0

    .line 871
    :cond_2
    invoke-interface {v0}, Lorg/acra/a/a;->j()Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_3

    const-string v1, ""

    invoke-interface {v0}, Lorg/acra/a/a;->j()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_3

    .line 872
    new-instance v0, Lorg/acra/sender/HttpSender;

    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v1

    invoke-virtual {v1}, Lorg/acra/c;->N()Lorg/acra/sender/HttpSender$Method;

    move-result-object v1

    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v2

    invoke-virtual {v2}, Lorg/acra/c;->O()Lorg/acra/sender/HttpSender$Type;

    move-result-object v2

    const/4 v3, 0x0

    invoke-direct {v0, v1, v2, v3}, Lorg/acra/sender/HttpSender;-><init>(Lorg/acra/sender/HttpSender$Method;Lorg/acra/sender/HttpSender$Type;Ljava/util/Map;)V

    invoke-virtual {p0, v0}, Lorg/acra/ErrorReporter;->b(Lorg/acra/sender/d;)V

    goto :goto_0

    .line 878
    :cond_3
    invoke-interface {v0}, Lorg/acra/a/a;->i()Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_0

    const-string v1, ""

    invoke-interface {v0}, Lorg/acra/a/a;->i()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 879
    new-instance v0, Lorg/acra/sender/b;

    invoke-direct {v0}, Lorg/acra/sender/b;-><init>()V

    invoke-virtual {p0, v0}, Lorg/acra/ErrorReporter;->a(Lorg/acra/sender/d;)V

    goto/16 :goto_0
.end method

.method public handleSilentException(Ljava/lang/Throwable;)V
    .locals 3
    .parameter

    .prologue
    .line 349
    iget-boolean v0, p0, Lorg/acra/ErrorReporter;->a:Z

    if-eqz v0, :cond_0

    .line 350
    sget-object v0, Lorg/acra/ReportingInteractionMode;->SILENT:Lorg/acra/ReportingInteractionMode;

    const/4 v1, 0x1

    const/4 v2, 0x0

    invoke-direct {p0, p1, v0, v1, v2}, Lorg/acra/ErrorReporter;->a(Ljava/lang/Throwable;Lorg/acra/ReportingInteractionMode;ZZ)V

    .line 351
    sget-object v0, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    const-string v1, "ACRA sent Silent report."

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 356
    :goto_0
    return-void

    .line 355
    :cond_0
    sget-object v0, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    const-string v1, "ACRA is disabled. Silent report not sent."

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method

.method public uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 287
    :try_start_0
    iget-boolean v0, p0, Lorg/acra/ErrorReporter;->a:Z

    if-nez v0, :cond_2

    .line 288
    iget-object v0, p0, Lorg/acra/ErrorReporter;->g:Ljava/lang/Thread$UncaughtExceptionHandler;

    if-eqz v0, :cond_1

    .line 289
    sget-object v0, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "ACRA is disabled for "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " - forwarding uncaught Exception on to default ExceptionHandler"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 291
    iget-object v0, p0, Lorg/acra/ErrorReporter;->g:Ljava/lang/Thread$UncaughtExceptionHandler;

    invoke-interface {v0, p1, p2}, Ljava/lang/Thread$UncaughtExceptionHandler;->uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V

    .line 315
    :cond_0
    :goto_0
    return-void

    .line 293
    :cond_1
    sget-object v0, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "ACRA is disabled for "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " - no default ExceptionHandler"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 308
    :catch_0
    move-exception v0

    .line 311
    iget-object v0, p0, Lorg/acra/ErrorReporter;->g:Ljava/lang/Thread$UncaughtExceptionHandler;

    if-eqz v0, :cond_0

    .line 312
    iget-object v0, p0, Lorg/acra/ErrorReporter;->g:Ljava/lang/Thread$UncaughtExceptionHandler;

    invoke-interface {v0, p1, p2}, Ljava/lang/Thread$UncaughtExceptionHandler;->uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V

    goto :goto_0

    .line 299
    :cond_2
    :try_start_1
    iput-object p1, p0, Lorg/acra/ErrorReporter;->h:Ljava/lang/Thread;

    .line 300
    iput-object p2, p0, Lorg/acra/ErrorReporter;->i:Ljava/lang/Throwable;

    .line 302
    sget-object v0, Lorg/acra/ACRA;->LOG_TAG:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "ACRA caught a "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " exception for "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lorg/acra/ErrorReporter;->b:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ". Building report."

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 307
    invoke-static {}, Lorg/acra/ACRA;->getConfig()Lorg/acra/c;

    move-result-object v0

    invoke-virtual {v0}, Lorg/acra/c;->q()Lorg/acra/ReportingInteractionMode;

    move-result-object v0

    const/4 v1, 0x0

    const/4 v2, 0x1

    invoke-direct {p0, p2, v0, v1, v2}, Lorg/acra/ErrorReporter;->a(Ljava/lang/Throwable;Lorg/acra/ReportingInteractionMode;ZZ)V
    :try_end_1
    .catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0
.end method
